import { post } from '@/utils/request'
export const groupList = p => post(`/service-goods/b/goodsgroup/v1/list`, p)
export const addGroup = p => post(`/service-goods/b/goodsgroup/v1/add`, p)
export const editGroup = p => post(`/service-goods/b/goodsgroup/v1/modify`, p)
export const delGroup = p => post(`/service-goods/b/goodsgroup/v1/del/${p.id}`, p, 'get')
export const searchGroup = p => post(`/service-goods/b/goodsgroup/v1/view/${p.id}`, p, 'get')
export const changeStatusGroup = p => post(`/service-goods/b/goodsgroup/v1/changeStatus/${p.id}/${p.publishStatus}`, p, 'get')
export const changeShowGroup = p => post(`/service-goods/b/goodsgroup/v1/statusModify/${p.id}/${p.status}`, p, 'get')
export const groupListByValid = p => post(`/service-goods/b/goodsgroup/v1/listByValid`, p, 'get')
export const pageModuleChildDataSelQuery = p => post(`/service-cms/b/page/v1/pageModule/pageModuleChildDataSelQuery`, p)
// export const customPageList = p => post(`/service-cms/b/page/v1/pageBase/customPageList`, p)

// 大码商品模板上传
export const upload = (p) => post(`/service-goods/b/goodsgoods/v1/upload/largeSizeGoods`, p)
// 获取大码图片
export const getBigGoodsPic = (p) => post(`/service-goods/b/goodsConfig/v1/largeSizeGoods/view`, p, 'get')
// 保存大码图片
export const saveBigGoodsPic = (p) => post(`/service-goods/b/goodsConfig/v1/largeSizeGoods/save`, p)

// 属性列表
export const categoryTree = (p) => post(`/service-goods/b/goodscategory/v1/list`, p, 'get')
// 添加商品
export const addGoods = (p) => post(`/service-goods/b/goods/v1/add`, p)

export const addGoodsSave = (p) => post(`/service-goods/b/goods/v1/save`, p)
// 删除商品
export const delGoods = (p) => post(`/service-goods/b/goods/v1/delBatch`, p)
// 编辑商品
export const editGoods = (p) => post(`/service-goods/b/goods/v1/modify`, p)
// 属性获取表单
export const getFormList = (p) => post(`/service-goods/b/goods/v1/addSpec`, p)
// 获取商品列表
export const getGoodsList = (p) => post(`/service-goods/b/goods/v1/pageList`, p)
// 查询商品详情
export const searchGoods = (p) => post(`/service-goods/b/goods/v1/view/${p.id}`, p, 'get')
// 改分组
export const changeGroup = (p) => post(`/service-goods/b/goods/v1/modifyByGroupId`, p)
// 查看sku
export const searchGoodsSku = (p) => post(`/service-goods/b/goods/v1/listBySku/${p.id}`, p, 'get')
// 变更sku
export const editGoodsSku = (p) => post(`/service-goods/b/goods/v1/modifySkuStock`, p)
// 批量改状态
export const changeGoodsStates = (p) => post(`/service-goods/b/goods/v1/modifyBatch`, p)
// 修改推荐状态
export const changeRecommendStates = (p) => post(`/service-goods/b/goods/v1/modifyByRecommend`, p)

// 属性列表
export const getGoodsAttrList = (p) => post(`/service-goods/b/goodsattr/v1/pageList`, p)
// 添加属性
export const addGoodsAttr = (p) => post(`/service-goods/b/goodsattr/v1/add`, p)
// 编辑属性
export const editGoodsAttr = (p) => post(`/service-goods/b/goodsattr/v1/modify`, p)
// 删除属性
export const delGoodsAttr = (p) => post(`/service-goods/b/goodsattr/v1/del/${p.id}`, p, 'get')
// 属性详情
export const searchGoodsAttr = (p) => post(`/service-goods/b/goodsattr/v1/view/${p.id}`, p, 'get')
// 改变属性状态
export const changeGoodsAttrState = (p) => post(`/service-goods/b/goodsattr/v1/changeStatus/${p.id}/${p.status}`, p, 'get')
// 获取规格列表
export const getSkuList = (p) => post(`/service-goods/b/goodsattrdefault/v1/pageList`, p)
// 添加规格
export const addSku = (p) => post(`/service-goods/b/goodsattrdefault/v1/add`, p)
// 添加规格值
export const addValueSku = (p) => post(`/service-goods/b/goodsattrdefault/v1/modifyByValue`, p)
// 删除规格
export const delSku = (p) => post(`/service-goods/b/goodsattrdefault/v1/del/${p.id}`, p, 'get')
// 编辑规格
export const editSku = (p) => post(`/service-goods/b/goodsattrdefault/v1/modify`, p)
// 规格详情
export const searchSku = (p) => post(`/service-goods/b/goodsattrdefault/v1/view/${p.id}`, p, 'get')
// 改变规格状态
export const changeSkuState = (p) => post(`/service-goods/b/goodsattrdefault/v1/changeStatus/${p.id}/${p.status}`, p, 'get')

// 素材分组
export const getMaterialGroupList = (p) => post(`/service-goods/b/goodssourcegroup/v1/list`, p)
// 添加分组
export const addMaterialGroup = (p) => post(`/service-goods/b/goodssourcegroup/v1/add`, p)
// 重命名
export const renameGroup = (p) => post(`/service-goods/b/goodssourcegroup/v1/modify`, p)
// 删除分组
export const delMaterialGroup = (p) => post(`/service-goods/b/goodssourcegroup/v1/del/${p.id}`, p, 'get')
// 素材列表
export const getMaterialList = (p) => post(`/service-goods/b/goodssource/v1/pageList`, p)
// 添加素材
export const addMaterial = (p) => post(`/service-goods/b/goodssource/v1/add`, p)
// 删除素材
export const delMaterial = (p) => post(`/service-goods/b/goodssource/v1/delBatch`, p)
// 修改素材
export const editMaterial = (p) => post(`/service-goods/b/goodssource/v1/modify`, p, 'get')
// 查询素材
export const searchMaterial = (p) => post(`/service-goods/b/goodssource/v1/view/${p.id}`, p, 'get')
// 移动分组
export const moveGroup = (p) => post(`/service-goods/b/goodssource/v1/modifyBatch`, p)

// 获取商品列表数量
export const getGoodsListNum = (p) => post(`/service-goods/b/goods/v1/listByCount`, p, 'get')
// 获取自己的商品数量
export const getMineGoodsListNum = (p) => post(`/service-goods/b/goods/v1/count`, p)

// 商品审核详情
export const searchGoodsToExamine = (p) => post(`/service-goods/b/goodsaudit/v1/view/${p.id}`, p, 'get')
// 商品审核
export const editGoodsToExamine = (p) => post(`/service-goods/b/goodsaudit/v1/modifyAndSave`, p)

// 商品属性(商铺)下拉列表
export const goodsSearchSkuList = (p) => post(`/service-goods/b/goodsattr/v1/listByAttr`, p)
// 商品分组(商铺)下拉列表
export const goodsSearchGroupTree = (p) => post(`/service-goods/b/goodsgroup/v1/listByGroup/${p.shopId}`, p, 'get')
// 商品上架
export const goodsUpShelf = (p) => post(`/service-goods/b/goods/v1/goodsGrounding`, p)
// 查看渠道
export const searchChannel = (p) => post(`/service-goods/b/goodschannel/v1/view/${p.goodid}`, p, 'get')
// 修改渠道
export const editChannel = (p) => post(`/service-goods/b/goodschannel/v1/modify`, p)
// 商品评论列表
export const getCommentList = (p) => post(`/service-goods/b/goodscomment/v1/pageList`, p)
// 添加回复
export const addReply = (p) => post(`/service-goods/b/goodscommentreply/v1/add`, p)
// 修改显示状态
export const changeShow = (p) => post(`/service-goods/b/goodscomment/v1/changeStatus/${p.id}/${p.status}`, p, 'get')
// 修改精选状态
export const changeSelected = (p) => post(`/service-goods/b/goodscomment/v1/changeSift/${p.id}/${p.status}`, p, 'get')
// 回复列表
export const getReplyList = (p) => post(`/service-goods/b/goodscommentreply/v1/listByCommentReply/${p.id}`, p, 'get')

// 标签列表
export const getTagList = (p) => post(`/service-goods/b/tags/v1/pageList`, p)
// 商品标签列表
export const getTagVaildList = (p) => post(`/service-goods/b/tags/v1/list`, p)
// 新增标签
export const addTag = (p) => post(`/service-goods/b/tags/v1/add`, p)
// 删除标签
export const delTag = (p) => post(`/service-goods/b/tags/v1/del/${p.id}`, p, 'get')
// 标签详情
export const searchTag = (p) => post(`/service-goods/b/tags/v1/view/${p.id}`, p, 'get')
// 编辑标签
export const editTag = (p) => post(`/service-goods/b/tags/v1/modify`, p)
// 设置标签
export const setTag = (p) => post(`/service-goods/b/goodsTags/v1/changeTagsBatch`, p)
// 获取当前图片信息
export const getThisImgInfo = p => post(`/service-goods/b/goodssource/v1/view/${p.id}`, p, 'get')
// 修改图片名称以及分组
export const modifyThisImgInfo = p => post(`/service-goods/b/goodssource/v1/modify`, p)

// 商品概览
export const goodsViewOverall = p => post(`/service-goods/b/goodsSurvey/v1/viewOverall`, p)
